﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Einstein.Data;

namespace Einstein.Group.DAL
{
    public class RoleAuthDAL
    {

        public IList<RoleAuth> SelectAll()
        {
            using (EinsteinEntities entities = new EinsteinEntities())
            {
                return entities.RoleAuth.ToList<RoleAuth>();
            }
        }

        public bool Add(RoleAuth info)
        {
            using (EinsteinEntities entities = new EinsteinEntities())
            {
                entities.RoleAuth.AddObject(info);
                return entities.SaveChanges() > 0;
            }
        }
 
    }
}
